package com.dbs.zstp;


import com.dbs.zstp.wiki.engine.ZhWikiPageProcessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 知识图谱启动类
 * @author npf
 * @create 2018-03-20 15:29
 **/
@SpringBootApplication()
public class ZstpApplication {

    protected static final Logger logger = LoggerFactory.getLogger(ZstpApplication.class);

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ZstpApplication.class, args);
        //启动时将applicationContext 对象直接注入爬虫解析类中
        ZhWikiPageProcessor.setApplicationContext(applicationContext);
        logger.error("知识图谱项目启动成功!");
    }
}
